﻿/*
 * Created by SharpDevelop.
 * User: IEscarro
 * Date: 9/7/2009
 * Time: 9:10 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Collections.Generic;
using Buaya.Model;

namespace Buaya.Gui
{
	/// <summary>
	/// Description of ModuleCommandForm.
	/// </summary>
	public partial class ModuleCommandForm : BaseForm
	{
		public ModuleCommandForm() : this(new ModuleCommand())
		{
			
		}
		
		public ModuleCommandForm(ModuleCommand c)
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			Model = c;
		}
		
		void ButtonOkClick(object sender, EventArgs e)
		{
			ModuleCommand c = Model as ModuleCommand;
			c.Name = textBoxName.Text;
			c.Command = textBoxCommand.Text;
			Close();
		}
		
		void ButtonCancelClick(object sender, EventArgs e)
		{
			Close();
		}
	}
}
